/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yang
 * Date: 2022-04-24
 * Time: 19:50
 */
public class Main {
    public static void main(String[] args) {
        int cnt = 0;
        for (int i = 1; i <= 100; i++) {
            int num = i;
            while(num != 0){
                if(num%10 == 9){
                    cnt++;
                }
                num/=10;
            }
        }
        System.out.println(cnt);
    }
}
